package com.justgame.project.service.system.controller;

import com.justgame.project.cloud.common.constant.Result;
import com.justgame.project.cloud.common.entity.PageRequest;
import com.justgame.project.service.system.service.SysUserInfoService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ZhouWeiBo
 * @create 2022/4/20
 */
@Slf4j
@RestController
@RequestMapping("/admin/user")
@RequiresRoles("admin")
@AllArgsConstructor
public class SysUserInfoController {
    private final SysUserInfoService sysUserInfoService;

    @RequestMapping("/queryUserList")
    public Result<Object> queryUserList(PageRequest pageRequest) {
        return Result.OK(sysUserInfoService.queryByPage(pageRequest));
    }

}
